{% extends 'homepage.html' %}

{% block content %}

{#
<div>
An {{KNOWL("ec", title="elliptic curve")}} is a {{KNOWL("ag.curve.smooth",title="smooth")}} projective {{KNOWL("ag.curve",title="curve")}} of {{KNOWL("ag.curve.genus",title="genus")}} 1 with a rational basepoint $O$. 
</div>
#}
<div>
The database currently contains the Cremona database of all
{{info.ncurves}} elliptic curves with {{ KNOWL('ec.q.conductor',title
= "conductor")}} at most {{info.max_N}}, all of which have {{
KNOWL('ec.q.rank', title="rank")}} &le; {{info.max_rank}}.
</div>

<h2> Browse {{ KNOWL('ec.q',title='elliptic curves over $\Q$')}}</h2>

<p>
By {{ KNOWL('ec.q.conductor',title = "conductor")}}:
{% for rnge in info.conductor_list %}
<a href="?conductor={{rnge}}">{{rnge}}</a>
{% endfor %}
</p>
<p>
By {{ KNOWL('ec.q.rank', title="rank")}}:
{% for r in info.rank_list: %}
<a href="?rank={{r}}">{{r}}</a>
{% endfor %}
</p>
<p>
By {{ KNOWL('ec.q.torsion_order', torsion=t,title="torsion order") }}:
{% for t in info.torsion_list: %}
<a href="?torsion={{t}}">{{t}}</a>
{% endfor %}
</p>


<h2> Find a specific curve or {{
  KNOWL('ec.isogeny_class',title="isogeny class") }} by {{
  KNOWL('ec.q.lmfdb_label',title="LMFDB label") }} </h2>
<form>
<input type='text' name='label' size=25 example="11.a2">
<button type='submit' name='jump' value='label or isogeny class' >label or isogeny class</button>
<br><span class="formexample">e.g. 11.a2 or 389.a or Cremona:11a1 </span>
{% if err_msg %}
<br><span class="errmsg">{{err_msg}}</span>
{% endif %}
</form>

<h2> Search </h2>
Please enter a value or leave blank:
<p></p>
<form>
  <table>
    <tr>
      <td>{{ KNOWL('ec.q.conductor',title = "conductor") }}</td>
     <td>
       <input type='text' name='conductor' example="389" size=10 value="{{conductor}}" />
     </td>
     <td><span class="formexample"> e.g. 389 or 100-200</span></td>
    </tr>


   <tr>
   <td>
    {{ KNOWL('ec.q.rank',title="rank") }}
    </td>
           <td>
           <input type='text' name='rank' example="0" size=10 value="{{rank}}" />
           </td>
           <td><span class="formexample"> e.g. 0 </span>
           </td>
    </tr>

    <tr>
          <td>
          {{ KNOWL('ec.q.torsion_order',title="torsion order") }}
          </td>
          <td>
          <input type='text' name='torsion' example="2" size=10 value="{{torsion}}" />
          </td>
          <td>
          <span class="formexample"> e.g. 2 </span>
          </td>
      </tr>

    <tr>
          <td>
          {{ KNOWL('ec.q.torsion_subgroup',title="torsion structure") }}
          </td>
          <td>
          <input type='text' name='torsion_structure' example="[2,4]" size=10 value="{{torsion_structure}}" />
          </td>
          <td>
          <span class="formexample"> e.g. [2,4] </span>
          </td>
      </tr>

    <tr>
          <td>
          {{ KNOWL('ec.q.analytic_sha_order',title="analytic order of &#1064;") }}
          </td>
          <td>
          <input type='text' name='sha_an' example="4" size=10 />
          </td>
          <td>
          <span class="formexample"> e.g. 4 </span>
          </td>
      </tr>


    <tr>
      <td>{{ KNOWL('ec.q.optimal',title="Optimal only") }}</td>
      <td>
         <select name='optimal'>
{% if optimal=='on' %}
           <option value="">No</option>
           <option value="on" selected="yes">Yes</option>
{% else %}
           <option value="">No</option>
           <option value="on">Yes</option>
{% endif %}
         </select>
      </td>


    </tr>

<tr>
<td align=left colspan=4>Maximum number of curves to display <input type='text' name='count' value={{count}} size=10 />
</td>
</tr>


  </table>
<p></p>
<td><button type='submit' value='Search'>Search</button></td>

</form>
{% endblock %}
